﻿<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="ProductsInManufacturer.ascx.cs" Inherits="smartphone.UserControls.ProductsInManufacturer" %>
<%@ Register Src="~/UserControls/Pager.ascx" TagPrefix="uc1" TagName="Pager" %>
<%@ Import Namespace="smartphone.App_Code" %>


<span class="headerTemplate">
    <asp:Label ID="LabelHeader" runat="server" Text="Label"></asp:Label>
</span>
<div class="sortSelect">
    <asp:DropDownList ID="DropDownSorting" runat="server"></asp:DropDownList>
</div>
<div class="product-listing">
    <asp:Label ID="LabelHasProduct" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:DataList ID="DlProductsManufacturerList" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" OnItemDataBound="DlProductsManufacturerList_ItemDataBound">
    <ItemTemplate>
       
        <a class="product-listing-image" href="<%# LinkClass.ToProductDetail(Eval("maSanPham").ToString()) %>">
            <img src="<%# LinkClass.ToProductImage(Eval("hinhDaiDien").ToString()) %>" 
                width="185" height="125" alt='<%# HttpUtility.HtmlEncode(Eval("tenSanPham")) %>'/>
        </a>
        
        <h5 class="product-listing-tile">
            <a href="<%# smartphone.App_Code.LinkClass.ToProductDetail(Eval("maSanPham").ToString()) %>">
                <%# HttpUtility.HtmlEncode(Eval("tenSanPham")) %>
            </a>
        </h5>
        <p class="product-listing-description">
            <%# (Eval("moTa")) %>
        </p>
        
        <span class="attrBlock">
            <asp:PlaceHolder ID="attrPlaceHolder" runat="server"></asp:PlaceHolder>
        </span>

        <span class="product-listing-price">
            <%# Eval("donGia", "{0:0,000}") + " vnđ" %>
        </span>

        <%--them CommandArgument de nhan ma san pham dua vao gio hang--%>
        <asp:LinkButton ID="LinkAddToCart" CssClass="add-to-cart" runat="server" CommandArgument='<%#Eval("maSanPham") %>' OnClick="LinkAddToCart_Click" CausesValidation="false">Giỏ hàng</asp:LinkButton>
        <asp:Label CssClass="labelDeal" ID="LabelDeal" runat="server" Text="Khuyến mại" Visible="false"></asp:Label>
        <%--<div class="checkboxCompare">
            <asp:CheckBox ID="CheckBoxCompare" runat="server" AutoPostBack="False" Text="So sánh" />
        </div>--%>
    </ItemTemplate>
</asp:DataList>
<uc1:Pager runat="server" id="bottomPager" />
</div>